public class test_12_01 {
    public static int max2(int x,int y){
        return x>y? x:y;
    }
    public static int max3(int x, int y ,int z){
        int ret=max2(x,y);
        return ret>z? ret:z;
    }

    public static void main1(String[] args) {
        int ret=max2(5,9);
        System.out.println(ret);
        int ret2=max3(9,6,12);
        System.out.println(ret2);

    }


    public static int sum(int x, int y){
        return x + y;
    }
    public static int sum(int x, int y, int z){
        return x + y + z;
    }
    public static void main2(String[] args) {
        System.out.println(sum(3,9));

        System.out.println(sum(9,5,1));
    }


    public static int max(int x,int y){
        return x>y? x: y;
    }
    public static double max(double x, double y, double z){
        double ret = x>y? x:y;
        return ret>z? ret:z;
    }
    public static void main3(String[] args) {
        System.out.println(max(9,5));
        System.out.println(max(5.9,5.5,6.6));
    }



    public static void hanoi(int x,char a,char b, char c){
        if(x==1){
            // 只有一个，直接a移动到c
            System.out.println("将圆盘"+x+"号从"+a+"移动到——>"+c);
        }else {
            // 先将除最底层的盘从 a 移动到 b
            hanoi(x-1,a,c,b);
            System.out.println("将圆盘"+x+"号从"+a+"移动到——>"+c);
            // 再将b上的盘移动到c
            hanoi(x-1,b,a,c);
        }
    }
    public static void main(String[] args) {
        hanoi(4,'a','b','c');
    }

}







